package com.kun.base.fs;

import com.kun.base.config.Config;

/**
 * @author likun
 * 2018/3/15 11:29
 * 获取FileSystem
 **/
public class FileSystemFactory {

    private volatile static FileSystem fileSystem;

    /**
     * 获取FileSystem
     *
     * @return
     */
    public static FileSystem getFileSystem() {
        if (fileSystem == null) {
            switch (Config.FILE_SYSTEM) {
                case 0:
                    fileSystem = new NativeFileSystem();
            }
        }
        return fileSystem;
    }
}
